import 'package:ball_lion/entity/record/football/zq_schedule_entity.dart';

class ZqPointsEntity {
  String? introduce;
  List<MatchList>? matchList;

  ZqPointsEntity({this.introduce, this.matchList});

  ZqPointsEntity.fromJson(Map<String, dynamic> json) {
    introduce = json['introduce'];
    if (json['list'] != null) {
      matchList = <MatchList>[];
      json['list'].forEach((v) {
        matchList!.add(new MatchList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['introduce'] = this.introduce;
    if (this.matchList != null) {
      data['list'] = this.matchList!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class MatchList {
  List<PointsList>? pointsList;
  int? maxMatchTime;
  String? name;
  Road? road;

  MatchList({this.pointsList, this.maxMatchTime, this.name, this.road});

  MatchList.fromJson(Map<String, dynamic> json) {
    if (json['list'] != null) {
      pointsList = <PointsList>[];
      json['list'].forEach((v) {
        pointsList!.add(new PointsList.fromJson(v));
      });
    }
    maxMatchTime = json['maxMatchTime'];
    name = json['name'];
    road = json['road'] != null ? new Road.fromJson(json['road']) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.pointsList != null) {
      data['list'] = this.pointsList!.map((v) => v.toJson()).toList();
    }
    data['maxMatchTime'] = this.maxMatchTime;
    data['name'] = this.name;
    if (this.road != null) {
      data['road'] = this.road!.toJson();
    }
    return data;
  }
}

class PointsList {
  String? name;
  List<GroupList>? groupList;
  Points? standingList;

  PointsList({this.name, this.groupList, this.standingList});

  PointsList.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    if (json['scheduleList'] != null) {
      groupList = <GroupList>[];
      json['scheduleList'].forEach((v) {
        groupList!.add(new GroupList.fromJson(v));
      });
    }
    standingList = json['standingList'] != null
        ? new Points.fromJson(json['standingList'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    if (this.groupList != null) {
      data['scheduleList'] = this.groupList!.map((v) => v.toJson()).toList();
    }
    if (this.standingList != null) {
      data['standingList'] = this.standingList!.toJson();
    }
    return data;
  }
}

class GroupList {
  String? name;
  List<Schedules>? schedules;
  int? sort;
  int? winTeamId;

  GroupList({this.name, this.schedules, this.sort, this.winTeamId});

  GroupList.fromJson(Map<String, dynamic> json) {
    name = json['name'];
    if (json['scheduleList'] != null) {
      schedules = <Schedules>[];
      json['scheduleList'].forEach((v) {
        schedules!.add(new Schedules.fromSoccer(v));
      });
    }
    sort = json['sort'];
    winTeamId = json['winTeamId'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['name'] = this.name;
    if (this.schedules != null) {
      data['scheduleList'] =
          this.schedules!.map((v) => v.toJsonSoccer()).toList();
    }
    data['sort'] = this.sort;
    data['winTeamId'] = this.winTeamId;
    return data;
  }
}

class Road {
  List<GroupList>? roadVs;
  List<GroupList>? roadVs16;
  List<GroupList>? roadVs4;
  List<GroupList>? roadVs8;

  Road({this.roadVs, this.roadVs16, this.roadVs4, this.roadVs8});

  Road.fromJson(Map<String, dynamic> json) {
    if (json['roadVs'] != null) {
      roadVs = <GroupList>[];
      json['roadVs'].forEach((v) {
        roadVs!.add(new GroupList.fromJson(v));
      });
    }
    if (json['roadVs16'] != null) {
      roadVs16 = <GroupList>[];
      json['roadVs16'].forEach((v) {
        roadVs16!.add(new GroupList.fromJson(v));
      });
    }
    if (json['roadVs4'] != null) {
      roadVs4 = <GroupList>[];
      json['roadVs4'].forEach((v) {
        roadVs4!.add(new GroupList.fromJson(v));
      });
    }
    if (json['roadVs8'] != null) {
      roadVs8 = <GroupList>[];
      json['roadVs8'].forEach((v) {
        roadVs8!.add(new GroupList.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.roadVs != null) {
      data['roadVs'] = this.roadVs!.map((v) => v.toJson()).toList();
    }
    if (this.roadVs16 != null) {
      data['roadVs16'] = this.roadVs16!.map((v) => v.toJson()).toList();
    }
    if (this.roadVs4 != null) {
      data['roadVs4'] = this.roadVs4!.map((v) => v.toJson()).toList();
    }
    if (this.roadVs8 != null) {
      data['roadVs8'] = this.roadVs8!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Points {
  String? groupName;
  int? index;
  int? isGroup;
  List<Qualifying>? qualifying;
  List<TeamStanding>? teamStanding;

  Points(
      {this.groupName,
      this.index,
      this.isGroup,
      this.qualifying,
      this.teamStanding});

  Points.fromJson(Map<String, dynamic> json) {
    groupName = json['groupName'];
    index = json['index'];
    isGroup = json['isGroup'];
    if (json['qualifying'] != null) {
      qualifying = <Qualifying>[];
      json['qualifying'].forEach((v) {
        qualifying!.add(new Qualifying.fromJson(v));
      });
    }
    if (json['teamStanding'] != null) {
      teamStanding = <TeamStanding>[];
      json['teamStanding'].forEach((v) {
        teamStanding!.add(new TeamStanding.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['groupName'] = this.groupName;
    data['index'] = this.index;
    data['isGroup'] = this.isGroup;
    if (this.qualifying != null) {
      data['qualifying'] = this.qualifying!.map((v) => v.toJson()).toList();
    }
    if (this.teamStanding != null) {
      data['teamStanding'] = this.teamStanding!.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Qualifying {
  int? beginRank;
  String? color;
  int? endRank;
  int? id;
  int? leagueId;
  String? leagueName;
  String? season;
  String? tagColor;
  int? source;

  Qualifying(
      {this.beginRank,
      this.color,
      this.endRank,
      this.id,
      this.leagueId,
      this.leagueName,
      this.season,
      this.tagColor,
      this.source});

  Qualifying.fromJson(Map<String, dynamic> json) {
    beginRank = json['beginRank'];
    color = json['color'];
    endRank = json['endRank'];
    id = json['id'];
    leagueId = json['leagueId'];
    leagueName = json['leagueName'];
    season = json['season'];
    tagColor = json['tagColor'];
    source = json['source'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['beginRank'] = this.beginRank;
    data['color'] = this.color;
    data['endRank'] = this.endRank;
    data['id'] = this.id;
    data['leagueId'] = this.leagueId;
    data['leagueName'] = this.leagueName;
    data['season'] = this.season;
    data['tagColor'] = this.tagColor;
    data['source'] = this.source;
    return data;
  }
}

class TeamStanding {
  String? deductionExplainCn;
  int? drawCount;
  int? getScore;
  int? goalDifference;
  String? groupCn;
  int? integral;
  int? leagueId;
  String? leagueName;
  int? loseCount;
  int? loseScore;
  int? rank;
  String? season;
  int? teamId;
  String? teamLogo;
  String? teamName;
  int? totalCount;
  int? type;
  int? winCount;

  TeamStanding(
      {this.deductionExplainCn,
      this.drawCount,
      this.getScore,
      this.goalDifference,
      this.groupCn,
      this.integral,
      this.leagueId,
      this.leagueName,
      this.loseCount,
      this.loseScore,
      this.rank,
      this.season,
      this.teamId,
      this.teamLogo,
      this.teamName,
      this.totalCount,
      this.type,
      this.winCount});

  TeamStanding.fromJson(Map<String, dynamic> json) {
    deductionExplainCn = json['deductionExplainCn'];
    drawCount = json['drawCount'];
    getScore = json['getScore'];
    goalDifference = json['goalDifference'];
    groupCn = json['groupCn'];
    integral = json['integral'];
    leagueId = json['leagueId'];
    leagueName = json['leagueName'];
    loseCount = json['loseCount'];
    loseScore = json['loseScore'];
    rank = json['rank'];
    season = json['season'];
    teamId = json['teamId'];
    teamLogo = json['teamLogo'];
    teamName = json['teamName'];
    totalCount = json['totalCount'];
    type = json['type'];
    winCount = json['winCount'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['deductionExplainCn'] = this.deductionExplainCn;
    data['drawCount'] = this.drawCount;
    data['getScore'] = this.getScore;
    data['goalDifference'] = this.goalDifference;
    data['groupCn'] = this.groupCn;
    data['integral'] = this.integral;
    data['leagueId'] = this.leagueId;
    data['leagueName'] = this.leagueName;
    data['loseCount'] = this.loseCount;
    data['loseScore'] = this.loseScore;
    data['rank'] = this.rank;
    data['season'] = this.season;
    data['teamId'] = this.teamId;
    data['teamLogo'] = this.teamLogo;
    data['teamName'] = this.teamName;
    data['totalCount'] = this.totalCount;
    data['type'] = this.type;
    data['winCount'] = this.winCount;
    return data;
  }
}
